//C12.1:strngbad.h -- flawed string class definition
#include <iostream>
#include <ostream>
#ifndef STRNGBAD_H__
#define STRNGBAD_H__

class StringBad
{
    char * str;        // pointer to string
    int len;           // length of string
    static int num_strings;   // number of objects
    public:
        StringBad(const char *s);   // constructor
        StringBad();                // default constructor
        ~StringBad();               // destructor
    // friend function
        friend std::ostream & operator<<(std::ostream & os,
                             const StringBad &str);
};
#endif